<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'user.label', default: 'user')}"/>
    <title>新增企业认证信息</title>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>贷款管理系统</li>
                    <li><g:link controller="certificate" action="index">企业认证信息列表</g:link></li>
                    <li class="active">
                        <span>新增企业认证信息</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                新增企业认证信息
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hblue">
            <div class="panel-heading">
                新增企业认证信息
            </div>

            <div class="panel-body">
                <g:form action="save" class="form-horizontal">
                    <g:if test="${flash.message}">
                        <div class="message alert alert-info" role="status">${flash.message}</div>
                    </g:if>
                    <g:hasErrors bean="${this.certificate}">
                        <ul class="errors" role="alert">
                            <g:eachError bean="${this.certificate}" var="error">
                                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                                    <g:message error="${error}"/>
                                </li>
                            </g:eachError>
                        </ul>
                    </g:hasErrors>
                    <div class="form-group">
                        <label class="col-md-2 control-label">公司名称</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="account" value="${accountId}"
                                      optionKey="id" optionValue="name" from="${com.next.Account.list()}" disabled="true"/>
                        </div>
                        <label class="col-md-2 control-label">认证时间</label>

                        <div class="col-md-3 datePicker">
                            <g:datePicker name="startTime"  value="" precision="day"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">认证机构</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="certificateAuthority" id="certificateAuthority"/>
                        </div>
                        <label class="col-md-2 control-label">证书名称</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="name" id="name"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">认证部门</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="certificateDepartment" id="certificateDepartment"/>
                        </div>
                        <label class="col-md-2 control-label">认证类型</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="type"
                                      optionKey="id" optionValue="name" from="${com.next.CertificateType.list()}"
                                      noSelection="['': '-请选择-']"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">登记日期</label>

                        <div class="col-md-3 datePicker">
                            <g:datePicker name="registerDate"  precision="day" value="${certificate?.registerDate}"/>
                        </div>
                        <label class="col-md-2 control-label">登记机构</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="registerAccount" id="registerAccount" value="${certificate?.registerAccount}"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">登记人</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="registerUser" id="registerUser"/>
                        </div>
                        <label class="col-md-2 control-label">有效日期</label>

                        <div class="col-md-3 datePicker">
                            <g:datePicker name="endTime"  value="" precision="day"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">更新日期</label>

                        <div class="col-md-3 datePicker">
                            <g:datePicker name="modifiedDate"  value="" precision="day"/>
                        </div>
                    </div>

                    <g:hiddenField name="targetUri"  value="${targetUri}"/>
                    <g:hiddenField name="account.id"  value="${accountId}"/>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <div class="col-md-1 col-md-offset-5">
                            <g:submitButton class="btn btn-info" name="create" value="保存"/>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
